﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UnitManage.aspx.cs" Inherits="User_UnitManage" Theme="normal" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>部门管理</title>
    
    <script language="javascript" type="text/javascript">
            function SelectAllCheckboxes(spanChk)
	        {
		        // Added as ASPX uses SPAN for checkbox
		        var xState=spanChk.checked;

		        elm = spanChk.form.elements;
		        for(i = 0; i < elm.length; i++)
		        {
			        if(elm[i].type == "checkbox" && elm[i].id != spanChk.id)
			        {
				        //elm[i].click();
				        if(elm[i].checked!=xState)
					        elm[i].click();	//elm[i].checked=xState;
			        }
		        }
	        }
    </script>
    
</head>
<body style="background-color:#fcf6ec">
    <form id="form1" runat="server">
        <div class="normalnav">
            <div class="normalcontent">
                用户管理>>>部门管理</div>
        </div>
        <div class="normalmenu">
            <div class="normalmenucontent" style="margin-left:150px;">
            
            </div>
        </div>
         <div class="normalgrid" style="left:10px; width:96%">
                    
                <asp:GridView ID="gvGroup" runat="server" AutoGenerateColumns="False" Style="border-color: #426F98;
                    border-width: 1px; border-style: double;" OnRowCommand="gvGroup_RowCommand" OnRowCreated="gvGroup_RowCreated"
                    SkinID="gvColumn" OnRowDataBound="gvGroup_RowDataBound" Width="745px">
                    <Columns>
                        <asp:TemplateField Visible="False" HeaderText="AccountID">
                            <ItemTemplate>
                                <asp:Label ID="label1" runat="server" Text='<%# Eval("GroupID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="选择">
                            <HeaderStyle Width="100px" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBoxItem" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="组名称">
                            <HeaderStyle Width="547px" />
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:LinkButton ID="lbtnGroupExpended" runat="server" CommandName="Group_expended"><div style="color:#426F98"><%# DataBinder.Eval(Container.DataItem, "Name")%></div>
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="设置">
                            <HeaderStyle Width="40px" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <a href='UnitEdit.aspx?id=<%# Eval("GroupID") %>' style="text-decoration: none">
                                    <div style="color: #426F98">
                                        修改</div>
                               </a>
                            </ItemTemplate>
                           
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="权重">
                            <HeaderStyle Width="40px" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="lblQZ" runat="server" Text='<%# Eval("RecordSort") %>'></asp:Label>
                            </ItemTemplate>
                           
                        </asp:TemplateField>
                        </Columns>
                </asp:GridView>

            </div>
            
            <!-- 命令操作 -->
            <div style="position: absolute; top: 30px; left: 10px;">
                <div style="float: left; margin-top: 15px;">
                    &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                    <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="false" Text="全选" onclick="javascript:SelectAllCheckboxes(this)" />
                </div>
                <div style="float: left; margin-top: 13px;">
                    &nbsp;
                    <asp:ImageButton ID="ibtnDelete" runat="server" ImageUrl="../Images/Basic/shanchu.gif"
                        OnClick="ibtnDelete_Click" />&nbsp;删除
                        <asp:ImageButton ID="ibtnAdd" runat="server" ImageUrl="../Images/Basic/tianjia.gif" OnClick="ibtnAdd_Click"
                         />&nbsp;新增
                </div>
            </div>
    </form>
</body>
</html>